package com.googlecode.spruce.remote.listener;

import com.googlecode.spruce.core.ServiceCheckPluginResult;

/**
 * A listener that is alerted to events regarding the running of service check
 * plugins. The plugin is called before and after each invocation of a service
 * check plugin.
 */
public interface ServiceCheckListener
{

    /**
     * Called immediately before a service check plugin is executed
     * 
     * @param action
     *            The name of the plugin that will be invoked
     */
    void preServiceCheck(String action);

    /**
     * Called immediately after a service check plugin is executed
     * 
     * @param action
     *            The name of the plugin that will be invoked
     * @param result
     *            The result of that plugin
     */
    void postServiceCheck(String action, ServiceCheckPluginResult result);

}
